package com.services.interfaces;

import com.config.exception.MyException;
import com.controllers.forms.PaginatorForm;
import com.controllers.forms.UserEditForm;
import com.controllers.forms.user.role.RoleEditForm;
import com.models.Role;
import com.models.User;

import java.util.List;

/**
 * Created by Administrator on 2017/4/12.
 */
public interface IUserService {
    List<User> getUserPaginatorList(PaginatorForm paginator) throws MyException;

    void deleteUser(Integer id) throws MyException;

    String getUserDeleteInfo (Integer id) throws MyException;

    void changeUserPassword(Integer userId, UserEditForm form) throws MyException;

    User addUser(UserEditForm form) throws MyException;

    User updateUser(UserEditForm form) throws MyException;

    boolean matchUserPassword(User user, String password);

    List<User> getPaginatorList(PaginatorForm paginator, String... fetchs);

    Role addRole(RoleEditForm form) throws MyException;

    Role updateRole(RoleEditForm form) throws MyException;

}
